// config.h
// Created by glt on 2025/9/28.

#ifndef TOY_CONFIG_H
#define TOY_CONFIG_H

#include <string>

struct ModuleA {
    int a;
    std::string b;
};

class Config {
public:
    static Config& Instance();

    [[nodiscard]] const std::string& name() const { return name_; }
    [[nodiscard]] int count() const { return count_; }
    [[nodiscard]] bool verbose() const { return verbose_; }
    [[nodiscard]] ModuleA module_a()  { return module_a_; }

    Config(const Config&) = delete;
    Config& operator=(const Config&) = delete;

private:
    Config();  // 在 .cpp 中定义，或直接内联实现

    ModuleA module_a_;
    std::string name_;
    int count_ = 0;
    bool verbose_ = false;
};



#endif // TOY_CONFIG_H